/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.srcptit.trainning.giangnd.btvn1;

import java.util.Scanner;

/**
 *
 * @author GIANG
 */
public class B5 {
    static void fibo() {
		Scanner sc = new Scanner(System.in);
		int n;
		System.out.println("n=");
		n = sc.nextInt();
		int a[] = new int[n + 1];
		a[0] = 0;
		a[1] = 1;
		for (int i = 2; i <= n; i++)
			a[i] = a[i - 1] + a[i - 2];
		System.out.println(a[n]);
	}

	public static void main(String args[]) {
		fibo();
	}
}
